package com.bs.demo.controller;

import com.bs.demo.common.R;
import com.bs.demo.entity.ThData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("new")
public class NewDataController {

    static ThData NEWTHDATA=null;
    @GetMapping("/all")
    public ThData getNew(){
        log.info("最新数据");
        if (NEWTHDATA==null){
            return null;
        }
        return NEWTHDATA;
    }

}
